package com.juzishuke.margin.s1.controller;

import com.juzishuke.margin.base.api.bill.MarginRepayPlanApi;
import com.juzishuke.margin.base.dto.bill.req.RepayPlanSearchReq;
import com.juzishuke.margin.base.dto.bill.res.RepayPlanDTO;
import com.juzishuke.margin.common.response.MarginResponse;
import com.juzishuke.margin.feign.sample.api.FeignSample;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author : libo@juzishuke.com
 * @Title :
 * @Description :
 * @date : 2024/4/10 14:43
 * @since :1.0
 */
@Slf4j
@RestController
public class FeignSampleImpl implements FeignSample {
    
    @Autowired
    private MarginRepayPlanApi marginRepayPlanApi;
    
    @Override
    @PostMapping(value = "/margin/repayPlan/query")
    public MarginResponse<List<RepayPlanDTO>> getRepayPlan(final RepayPlanSearchReq repayPlanSearchReq) {
        return marginRepayPlanApi.getRepayPlan(repayPlanSearchReq);
    }
}
